package com.xiyu.service.vo.elder.register.baseVO;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import jakarta.validation.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;
import static com.xiyu.service.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
import java.time.LocalDateTime;

/**
 * 事故登记 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class ElderAccidentBase {

    @Schema(description = "老人ID")
    private Long elderId;

    @Schema(description = "事故类型")
    @Range(max = 127, message = "事故类型最大不能超过127")
    private Integer accidentType;

    @Schema(description = "事故等级")
    @Range(max = 127, message = "事故等级最大不能超过127")
    private Integer accidentGrade;

    @Schema(description = "发生时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime accidentTime;

    @Schema(description = "事故原因")
    @Size(max = 1024, message = "事故原因长度不能超过1024")
    private String accidentReason;

    @Schema(description = "事故描述")
    @Size(max = 1024, message = "事故描述长度不能超过1024")
    private String accidentDescribe;

    @Schema(description = "图片")
    @Size(max = 8192, message = "图片长度不能超过8192")
    private String imgUrl;

}
